package com.naml.demo;

/**
 * @author marin
 * @version 1.0
 * @date 2025/4/26 15:37
 * @desc
 */
@SuppressWarnings("all")
public class CpuNum {
    public static void main(String[] args) {
        Runtime runtime = Runtime.getRuntime();
        //获取当前电脑cpu的数量
        int i = runtime.availableProcessors();
        System.out.println(i);
    }
}
